package com.lf.service.impl;

import com.lf.mapper.UserMapper;
import com.lf.model.EbUser;
import com.lf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<EbUser> list(int page, int pageSize) {
        return userMapper.findByPage((page-1)*pageSize,pageSize);
    }
    @Override
    public int getMaxPage(int pageSize) {
        int result= userMapper.getMaxPage(pageSize);
        return result;
    }
}
